<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../../static/css/main.css">
    <script type="text/javascript" src="../../static/js/jquery-1.12.4.min.js"></script>
    <script type="text/javascript" src="../../static/js/main.js"></script>
    <script type="text/javascript" src="../../static/js/markdown_main.js"></script>
    <script type="text/javascript" src="../../static/js/detail.js"></script>
    <title>hy的web</title>
</head>
<body>
<header>
    <!--头部-->
    <div class="box">
        <img src="../../static/img/logo.png" class="logo">
        <!--导航栏-->
        <div class="right bar">
            <!--选项-->
            <a href="{{ url_for('index_blu.index') }}" class="home_b"><img src="../../static/img/home.png"></a>
            <a href="{{ url_for('user_blu.user_write_new') }}" class=""><img src="../../static/img/write.png"></a>
            <a href="{{ url_for('user_blu.user') }}" class="ava_b"><img src="{{ava}}"></a>
            {%if user%}
            <a href="/passport/logout"><img src="../../static/img/logout.png"></a>
            {%endif%}
        </div>
    </div>
</header>
<div class="box centre">
    <div class="left middle">
        <div>
            <h3>{{article.title}}</h3>
            <hr>
            <p class="left">标签：#{{classify.name}}#</p>
            <p class="right">
                更新时间{{article.update_time}}&nbsp;&nbsp;;
                浏览{{article.clicks}}&nbsp;&nbsp;
                <a>点赞{{article.praise.count()}}&nbsp;&nbsp;</a>
                收藏{{article.collector.count()}}
            </p>
        </div>

        <div class="art_content" value="{{article.content}}"></div>
        <hr>
        <!--点赞收藏按钮-->
        <div class="blog_list">
            <ul href="#" class="right" value="{{article.id}}">
                <li class="col_article"><img src="../../static/img/coll.png">{{article.collector.count()}}
                    <!--收藏--></li>
                <li class="like_article"><img src="../../static/img/like.png">{{article.praise.count()}}<!--点赞-->
                </li>
            </ul>
        </div>

    </div>
    <div class="left side">
        <a class="writer_box_name">
            <h3 class="left"><a href="/to_writer/{{article.user_id}}">{{article.user.nick_name}}</a></h3>
            <a href="/to_writer/{{article.user_id}}"><img class="right" src="{{article.user.avatar_url}}"></a></a>


        <table class="writer_table left">
            <tr>
                <td>文章</td>
                <td>收藏</td>
                <td>粉丝</td>
                <td>关注</td>
            </tr>
            <tr>
                <td>{{article.user.article.count()}}</td>
                <td>{{article.user.collects.count()}}</td>
                <td>{{article.user.fans.count()}}</td>
                <td>{{article.user.focus.count()}}</td>
            </tr>
        </table>

        <div class="left follow_writer" value={{article.user_id}}>
            {%if writer.can_follow or user==None%}
            <a href="#">关注</a>
            {%else%}
            <a href="#">取消关注</a>
            {%endif%}
        </div>
    </div>
</div>
</body>
</html>